package com.loveprogrammer.eternity.model.console;

import com.alibaba.excel.util.DateUtils;

import java.util.Date;

/**
 * @version 1.0.0
 * @description: 输出类
 * @author: eric
 * @date: 2022-08-05 16:55
 **/
public class ConsolePrint {

    public static void publishMessage(String content,int position) {
        String format = DateUtils.format(new Date(), DateUtils.DATE_FORMAT_17);
        String threadName = Thread.currentThread().getName();
        if(position == 0) {
            System.out.print(content);
        }else if(position == 1) {
            // System.out.println(format + "---" + threadName + "---" + content);
            System.out.println(content);
        }else {
            // System.out.println(format + "\t\t\t\t\t\t\t\t" + threadName + "---" + content);
            System.out.println("\t\t\t\t\t\t\t\t" + content);
        }
    }

    public static void publishMessage(String content) {
        System.out.println(content);
    }

    public static void publishMessagePrint(String content,String placeholder) {
        System.out.print(content + placeholder);
    }
}
